﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NewBee.Core.BusinessService
{
    /// <summary>
    /// 业务异常定义
    /// 内含：业务异常编码，供前端应用转义！
    /// </summary>
    public class BusinessException : System.Exception
    {
        private string _ErrorCode = "";

        public string ErrorCode
        {
            get
            {
                return _ErrorCode;
            }
        }

        public BusinessException(string message)
            : base(message)
        {

        }
        public BusinessException(string message, string code)
            : base(message)
        {
            this._ErrorCode = code;
        }
    }
}
